<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0"/>
    <title>七云验证器</title>
    <style>
        img {
            -webkit-user-drag: none;
            -moz-user-drag: none;
            -o-user-drag: none;
            -ms-user-drag: none;
            user-drag: none;

        }

        .bg_img {
            background: url(img/ic_bg.jpg);
            position: absolute;
            left: 0;
            top: 0;
            width: 100vw;
            height: 100vh;
            margin: 0 auto;
            display: flex;
            justify-content: center;
        }


        .icon_img {
            width: 306px;
            height: 66px;
            position: absolute;
            top: 58px;
            left: 98px;
        }

        .container {
            width: 100%;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            align-items: center;
            padding-bottom: 30px;
        }

        .bg_qr {
            margin: auto;
            width: 100%;
            height: 390px;
            display: flex;
            background: #FFF;
            flex-direction: column;
            justify-items: center;
            align-items: center;
            padding: 0 20px;
        }

        .bg_img_text {
            margin: auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .qr_img {
            width: 250px;
            height: 250px;
            margin: auto;
        }

        .text_des {
            font-size: 18px;
            margin: 18px auto auto;
        }

        .item {
            display: flex;
            width: 100%;
            justify-content: center;
            align-items: center;
            flex-direction: row;
        }

        .qr_item {
            margin: 10px;
            display: flex;
            flex-direction: column;
            align-items: center;

        }


        .qr_down {
            width: 100px;
            height: 100px;
        }

        #preview {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 200px;
            height: 200px;
            z-index: 999;
            background: #FFF;
            position: absolute;
            visibility: hidden;
        }

        #preview:after {
            position: relative;
            content: "";
            border-bottom: 10px solid #0000;
            border-right: 10px solid #0000;
            border-left: 10px solid #0000;
            border-top: 10px solid #fff;
            top: calc(50% + 10px);
            left: calc(-50% - 10px)
        }

        #preview:before {
            position: relative;
            content: "";
            border: 10px solid #0000;
        }

        .item_table {
            display: flex;
        }

        .item_table_title {
            text-align: center;
            display: block;
            line-height: 22px;
            font-size: 26px;
            color: #666666;
            width: 268px;
            margin: 0 40px 20px;
        }

        .item_table_title label {
            display: inline-block;
            padding-bottom: 20px;
        }

        .item_table_title label:after {
            position: relative;
            width: 70px;
            height: 3px;
            content: "";
            display: inline-block;
        }

        .item_table_title label:before {
            position: relative;
            top: 20px;
            content: "";
            display: inline-block;
            width: 70px;
            height: 3px;
            left: calc(calc(100% - 70px) / 2);
            background: #55316b;
            border-radius: 5px;
        }

        .item_table_title .bgt:before {
            background-color: #0000;
        }

        .qr_div {
            color: #666666;
            width: 700px;
            display: flex;
            flex-direction: row;
            justify-content: space-around;
        }

        .hide {
            display: none;
        }

    </style>
</head>
<body>
<div class="bg_img">
    <img class="icon_img" src="img/ic_icon.png" alt=""/>
    <div class="container">
        <div class="item">
            <div class="bg_img_text">
                <div class="bg_qr">
                    <img class="qr_img" src="img/qrcode.png" alt=""/>
                    <span class="text_des">请使用七云验证器扫码验证</span>
                </div>
            </div>
        </div>
        <div class="item" style="margin-top: 100px;">
            <div class="item_table">
                <div class="item_table_title">
                    <label>7x SASE</label>
                </div>
            </div>
            <div class="item_table">
                <div class="item_table_title">
                    <label class="bgt">7x 验证器</label>
                </div>
            </div>
        </div>
        <div class="item">
            <div class="qr_div">
                <div class="qr_item">
                    <div>
                        <img class="qr_down" alt="" src="img/android.png"/>
                        <img class="hide" alt="" src="img/qrcode.png"/>
                    </div>
                    <div><span class="text_des">Android</span></div>
                </div>
                <div class="qr_item">
                    <div>
                        <img class="qr_down" alt="" src="img/ios.png"/>
                        <img class="hide" alt="" src="img/qrcode.png"/>
                    </div>
                    <div><span class="text_des">ios</span></div>
                </div>
                <div class="qr_item">
                    <div>
                        <a href="img/qrcode.png" target="_blank">
                            <img class="qr_down pc" alt="" src="img/windows.png"/>
                        </a>
                    </div>
                    <div><span class="text_des">Windows</span></div>
                </div>
                <div class="qr_item">
                    <div>
                        <a href="img/qrcode.png" target="_blank">
                            <img class="qr_down pc" alt="" src="img/imac.png"/>
                        </a>
                    </div>
                    <div><span class="text_des">macOS</span></div>
                </div>
                <div class="qr_item">
                    <div>
                        <a href="img/qrcode.png" target="_blank">
                            <img class="qr_down pc" alt="" src="img/web_extend.png"/>
                        </a>
                    </div>
                    <div><span class="text_des">浏览器插件</span></div>
                </div>
            </div>
            <div class="qr_div hide">
                <div class="qr_item">
                    <div>
                        <img class="qr_down" alt="" src="img/android.png"/>
                        <img class="hide" alt="" src="img/qrcode.png"/>
                    </div>
                    <div><span class="text_des">Android</span></div>
                </div>
                <div class="qr_item ">
                    <div>
                        <img class="qr_down" alt="" src="img/ios.png"/>
                        <img class="hide" alt="" src="img/qrcode.png"/>
                    </div>
                    <div><span class="text_des">ios</span></div>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="preview">
    <img id="preview_img" src="" alt="" width="200px" height="200px"/>
</div>
<script>
    let preview = document.getElementById("preview")
    let previewImg = document.getElementById("preview_img")
    document.querySelectorAll(".qr_down:not(.pc)").forEach(ele => {
        ele.addEventListener('mouseover', function () {
            previewImg.src = ele.nextElementSibling.getAttribute('src')
            preview.style.visibility = "visible"
            preview.style.top = ele.getBoundingClientRect().y - preview.getBoundingClientRect().height - 10  + "px"
            preview.style.left = ele.getBoundingClientRect().x - (preview.getBoundingClientRect().width - ele.getBoundingClientRect().width) / 2 + "px"
        })
        ele.addEventListener('mouseout', function () {
            preview.style.visibility = "hidden"
        })
    })
    let qr_div = document.querySelectorAll(".qr_div");
    let item_table = document.querySelectorAll(".item_table_title");
    item_table.forEach((ele, index) => {
        ele.addEventListener("mouseover", function () {
            qr_div.forEach((e, i) => {
                if (index === i) {
                    e.classList.remove("hide")
                    item_table[i].querySelector("label").classList.remove("bgt")
                } else {
                    e.classList.add("hide")
                    item_table[i].querySelector("label").classList.add("bgt")
                }
            })
        })
    })
</script>
</body>
</html>